<template>
  <div class="row">
    <div class="col-xs-12">
      <div v-if="errorMessage" class="alert alert-danger">
        {{ errorMessage }}
      </div>
      <!--只针对 注册进来的 看 我的公司，非系统管理下的我的公司-->
      <MyCompanyInfo  :data="data" title="我的公司"></MyCompanyInfo>
    </div>
  </div>
</template>
<script>
import MyCompanyInfo from '@/views/oms/basicData/company/MyCompanyInfo'
import {filterDataBaseDictionary} from '@/filters'
import {dotData} from '@/utils'

export default {
  name: 'basicDataCompanyMy',
  components: {
    MyCompanyInfo
  },
  filters: {
    filterDataBaseDictionary
  },
  data() {
    return {
      id: this.$route.params.id,
      data: {},
      errorMessage: ''
    }
  },
  created() {
    this.getData()
  },
  computed: {},
  methods: {
    getData() {
      this.$ajax.get('/ms-warehouse-order/basicData/findMyCompanyInfo').then(response => {
        let success = dotData(response, 'success')
        if (success) {
          this.data = response.data || {}
        } else {
          this.errorMessage = dotData(response, 'error_message')
        }
      })
    }
  }
}
</script>
